﻿@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>欢迎登录后台管理系统</title>
    <link href="~/Content/userlogin/css/style.css" rel="stylesheet" />
    <script src="~/Content/easyui/jquery.min.js"></script>
    <script src="~/Content/userlogin/js/cloud.js"></script>
    <script src="~/Content/js/tjzheng.js"></script>
</head>
<body>
    <div id="mainBody">
        <div id="cloud1" class="cloud"></div>
        <div id="cloud2" class="cloud"></div>
    </div>
    <div class="logintop">
        <span>欢迎登录后台管理界面平台</span>
        @*        <ul>
                <li><a href="#">回首页</a></li>
                <li><a href="#">帮助</a></li>
                <li><a href="#">关于</a></li>
            </ul>*@
    </div>
    <div class="loginbody">
        <span class="systemlogo"></span>
        <div class="loginbox">
            <ul>
                <li>
                    <input name="userName" type="text" class="loginuser" onclick="JavaScript: this.value = ''" />
                </li>
                <li>
                    <input name="password" type="password" class="loginpwd" onclick="JavaScript: this.value = ''" />
                </li>
                <li>
                    <input type="button" class="loginbtn" value="登录" />
                    @*                    <label><input name="" type="checkbox" value="" checked="checked" />记住密码</label>
                        <label><a href="#">忘记密码？</a></label>*@
                </li>
            </ul>
        </div>
    </div>
    <div class="loginbm">版权所有  2015  @*<a href="javascrip:;">郑廷建</a>*@  CMS信息管理系统</div>

    <!--遮罩背景-->
    <div class="datagrid-mask"></div>
    <!--加载等待-->
    <div class="datagrid-mask-msg" style="left: 50%; height: 40px; margin-left: -100.5px; line-height: 40px;">正在登录中......</div>

    <script type="text/javascript">
        $(function () {
            $('.loginbox').css({ 'position': 'absolute', 'left': ($(window).width() - 692) / 2 });
            $(window).resize(function () {
                $('.loginbox').css({ 'position': 'absolute', 'left': ($(window).width() - 692) / 2 });
            });
            $(".loginpwd").keydown(function (event) {
                var key = event.keyCode;
                switch (key) {
                    case 13:
                        LoginIn();
                        break;
                    default:
                        break;
                }
            });
            $(".loginbtn").click(LoginIn);
            function LoginIn() {
                var objAjaxEntity = new AjaxEntity();
                objAjaxEntity.url = "/home/login";
                var userName = $('.loginuser').val();
                var password = $('.loginpwd').val();
                objAjaxEntity.executing = function () {
                    var flag = !(userName == "" || userName.replace(/\s/g, "") == "" || password == "");
                    if (flag) {
                        ShowProcess();
                    }
                    return flag;
                };
                objAjaxEntity.data = { userName: userName, password: password };
                objAjaxEntity.executeSuccess = function (InvokeResult) {
                    if (InvokeResult.ResultCode == "Success") {
                        window.location.href = "/";
                    } else {
                        CloseProcess();
                        alert(InvokeResult.ResultMessage);
                    }
                };
                objAjaxEntity.execute();
            }
        });
    </script>
</body>
</html>
